package com.cxso.example.domain.wlpt.payee;

import com.cxso.example.enums.wlpt.AccountTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Setter
@Getter
@Accessors(chain = true)
@Schema(description = "收款人基础信息")
public class ApiPayeeBasicDomain {

    @Schema(description = "收款人姓名")
    @NotBlank(message = "收款人姓名不能为空")
    @Pattern(regexp = "^[\u2E80-\u9FFF·]{2,60}$", message = "收款人姓名格式错误")
    private String payeeName;

    @Schema(description = "收款人身份证")
    @NotBlank(message = "收款人身份证不能为空")
    @Pattern(regexp = "[1-9]\\d{5}[1-2]\\d{3}((0\\d)|(1[0-2]))(([012]\\d)|3[0-1])\\d{3}(\\d|X|x)", message = "收款人身份证格式错误")
    private String payeeIdCard;

    @Schema(description = "收款银行卡号")
    @NotBlank(message = "收款银行卡号不能为空")
    private String payeeBankCard;

    @Schema(description = "收款银行卡图片")
    private String payeeBankCardImg;

    @Schema(description = "收款银行")
    private String payeeBankName;

    @Schema(description = "收款手机号")
    @NotBlank(message = "收款手机号不能为空")
    @Pattern(regexp = "(?:0|86|\\+86)?1[3-9]\\d{9}", message = "收款手机号格式错误")
    private String payeePhone;

    @Schema(description = "收款人类型")
    @NotNull(message = "收款人类型不能为空")
    private AccountTypeEnum accountType;

}
